import type { RouteRecordRaw } from 'vue-router'
import { PageEnum } from "/@/enums/pageEnum";
// import login from "../../view/login.vue";


export const DashboardRoute: RouteRecordRaw = {
  path: '/dashboard',
  name: 'dashboard',
  component: () => import('/@/view/dashboard.vue'),
  redirect: '/dashboard/page1',
  meta: {
    title: '首页'
  },
  children: [
    {
      path: 'page1',
      name: 'page1',
      component: () => import('/@/view/pages/page1.vue')
    }
  ]
}

export const LoginRoute : RouteRecordRaw = {
  path: PageEnum.BASE_LOGIN,
  name: '/login',
  component: () => import('/@/view/login.vue'),
  meta: {
    title: '登录'
  },

}

const RootRoute: RouteRecordRaw = {
  path: '/',
  name: 'root',
  redirect: PageEnum.BASE_HOME,
  meta: {
    title: '正在登陆系统...'
  },
}


export default [
  LoginRoute,
  DashboardRoute,
  RootRoute
]
